<?php

namespace App\Vilidate;

/**
 * user控制器下的验证规则类
 */
class HomeController
{
    public $index = ['rule'=>[], 'msg'=>[]];

    public $tag = ['rule'=>[], 'msg'=>[]];

    public $orderList = ['rule'=>[], 'msg'=>[]];

    public $episodes = ['rule'=>[], 'msg'=>[]];
    public $login = [
        'rule'=>[
            'username' => 'required',
            'password' => 'required|min:6',
        ],
        'msg'=>[
            'username.required' => '用户名不能为空！',
            'password.min' => '密码不能少于6位数',
            'password.required' => '密码不能为空',
        ]
    ];

    public $order = [
        'rule'=>[
            'phone' => 'required',
            'playletIds' => 'required|array',
        ],
        'msg'=>[
            'phone.required' => '联系手机号码不能为空',
            'playletIds.array' => '短剧数据应为数组',
            'playletIds.required' => '短剧不能为空',
        ]
    ];

    public $list = [
        'rule'=>[
            'ranking' => 'integer',
            'tag' => 'integer',
            'pay_type' => 'integer',
        ],
        'msg'=>[
            'ranking.integer' => '类型应为整数',
            'tag.integer' => '标签应为整数',
            'pay_type.integer' => '支付类型应为整数',
        ]
    ];
}